{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

{:dump($wxConfig)}

<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">

wx.config({
    debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
    appId: '{$wxConfig.appId}', // 必填，公众号的唯一标识
    timestamp: {$wxConfig.timestamp}, // 必填，生成签名的时间戳
    nonceStr: '{$wxConfig.nonceStr}', // 必填，生成签名的随机串
    signature: '{$wxConfig.signature}',// 必填，签名，见附录1
    jsApiList: [
				'checkJsApi',
				'onMenuShareTimeline',
				'onMenuShareAppMessage',
				'onMenuShareQQ',
				'onMenuShareWeibo',
				'hideMenuItems',
				'showMenuItems',
				'hideAllNonBaseMenuItem',
				'showAllNonBaseMenuItem',
				'translateVoice',
				'startRecord',
				'stopRecord',
				'onRecordEnd',
				'playVoice',
				'pauseVoice',
				'stopVoice',
				'uploadVoice',
				'downloadVoice',
				'chooseImage',
				'previewImage',
				'uploadImage',
				'downloadImage',
				'getNetworkType',
				'openLocation',
				'getLocation',
				'hideOptionMenu',
				'showOptionMenu',
				'closeWindow',
				'scanQRCode',
				'chooseWXPay',
				'openProductSpecificView',
				'addCard',
				'chooseCard',
				'openCard'
               ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
});

wx.ready(function() {
	alert("ready");
	wx.checkJsApi({
	    jsApiList: ['onMenuShareTimeline'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
	    success: function( res ) {
	        // 以键值对的形式返回，可用的api值true，不可用为false
	        // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
	     	var shareData = {
			    title: 'this is title',
			    desc: 'this is desc',
			    link: 'http://w.wmfl.cn',
			    imgUrl: 'http://w.wmfl.cn/img/bdlogo.png', 
			    success: function () { 
			        // 用户确认分享后执行的回调函数
			        alert('share ok');
			    },
			    cancel: function () { 
			        // 用户取消分享后执行的回调函数
			    }
			}
	    	wx.onMenuShareTimeline(shareData);
	     	wx.onMenuShareAppMessage(shareData);
	    }
	});
});
</script>
</body>
</html>